<template>
    <div>
        <h3>详情 -- {{msg}}</h3>


        <comment-box :id="'我是夫组件传递的值'"></comment-box>

      
    </div>
</template>

<script>
import comment from '../subcomponents/index.vue'


export default {
    data(){
        return {
            msg: '我是新闻组件',
            
        }
    },
    components: { "comment-box": comment},
    created(){
        this.init(this.$route.params.id)
    },
    mounted(){
        
    },
    methods:{
        init(id){
            this.$http.get("song/detail?ids="+id).then(result => {
                // console.log(JSON.stringify(result.body.songs[0]))
                this.msg = result.body.songs[0].al.name
            })
        },
        detail(id){
            console.log(id)
            
        },
        
    }
}
</script>

<style lang="scss" scoped>
 a{
    text-decoration: none;
}
.time{
    font-size: 12px;
    color: #226aff;
    display: flex;
    justify-content: space-between;//内容两端对齐
}
</style>